public class Hero {
    public String name;
    public int hp;

    public void introduce() {
        System.out.println("我是英雄，我的基本信息如下：");
        System.out.println("名字：" + this.name + ",生命值：" + this.hp);
        System.out.println("----------------------------------------");
    }
}
class Weapon {
    public String name;
    public int attack;

    //介绍的方法
    public void introduce() {
        System.out.println("我是武器，我的基本信息如下：");
        System.out.println("名字：" + this.name + ",生命值：" + this.attack);
        System.out.println("----------------------------------------");
    }
}
class Monster {
    public String name;
    public int hp;
    public String type;

    //介绍的方法
    public void introduce() {
        System.out.println("我是怪物，我的基本信息如下：");
        System.out.println("名字：" + this.name + ",生命值：" + this.hp + ",类型：" + type);
    }

    public static void main(String[] args) {
        Hero hero = new Hero();
        hero.name = "李小侠";
        hero.hp = 800;

        Weapon weapon = new Weapon();
        weapon.name = "死神镰刀";
        weapon.attack = 100;

        Monster monster = new Monster();
        monster.name = "小龟";
        monster.hp = 300;
        monster.type = "潜水型";

        hero.introduce();
        weapon.introduce();
        monster.introduce();
    }
}

